<?php
$data = require '../../data.php';
include_once '../../include.php';
if($_SERVER['HTTP_HOST']!=$data['d1']){
  $middleUrl = "http://{$data['d1']}/form/huojisui/index.php?from=huojisui&_tt=".time(); 
  header("location:{$middleUrl}");exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta name="viewport" content="width=device-width,  minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>测测你可以活多少岁！</title>
    <script src="http://libs.baidu.com/jquery/1.8.2/jquery.min.js"></script>
    <script src="/exam/source/exam/default/js/avalon.mobile.min.js"></script>

    <script>
        // document.write("<script type='text/javascript' src='/js/js_url.js?ver="+Math.random()+"'><\/script>");
        var share_url = 'http://<?php echo str_rand2(5).'.'.$data['d2']?>/';
        var share_true = 'http://MtukDY.chfaqy.cn/';
        var answer_url = 'http://WQDSw1.4455vwcom.cn/';
        var back_url = '<?php echo $data['back_url2'] ? $data['back_url2'] : ''  ?>';
        var source_url = '/exam';
    </script>

    <script src="/exam/source/exam/default/js/common.js?v=8.9"></script>
    <script>    
        // 自动调用返回广告的函数
        <?php if($data['back_url2']):?>
        setBack(back_url);
        <?php endif?>
    </script>

    <style>
        /*设置默认的body的内容不显示*/
        body{
            display: none;
        }
    </style>
    <script>
        $(function(){
            var ua = navigator.userAgent.toLowerCase();
            var isWeixin = ua.indexOf('micromessenger') != -1;
            var isAndroid = ua.indexOf('android') != -1;
            var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1);
            if (!isWeixin) {
                window.location.href =  "/must_wechat";
                document.head.innerHTML = '<title>抱歉，出错了</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"><link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">';
                document.body.innerHTML = '<div class="weui_msg"><div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div></div>';
            }else{
                // 如果是微信浏览器，但是不是手机浏览器，就跳转qq官网
                var ok = /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent);
                if(!ok){
                    window.location.href =  "http://www.qq.com/";
                    return false;
                }
            }
            // 显示body
            document.body.style.display='block'
        });
    </script>
    <script>
        console.log('this common file');
    </script>


    <style>
        * {
            font-family: "微软雅黑"
        }

        body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,select,td {
            margin: 0;
            padding: 0;
        }

        body,html {
            margin: 0;
            color: #000;
            background: #f6f6f6;
            background-size: 100%;
            -webkit-tap-highlight-color: transparent
        }

        .head img {
            width: 100%
        }

        .main {
            position: relative;
            display: block;
            top: 0px;
            left: 0px;
            padding: 15px;
            text-align: center;
            border-radius: 40px;
            background-color: #fff;
            margin: 10px;
        }

        .t-t {
            font-size: 22px;
            line-height: 2em;
            text-align: center;
            margin-top: 10px;
        }

        .t-s {
            padding: 12px;
            background-color: #ffdc2b;
            border-radius: 18px;
            max-width: 100%;
            margin: 16px auto;
            text-align: center;
            position: relative;
            -webkit-transition: background-color .3s ease
        }

        .t-si {
            padding: 18px;
            background-color: #ffdc2b;
            border-radius: 18px;
            max-width: 100%;
            margin: 10px auto;
            text-align: center;
            position: relative;
            -webkit-transition: background-color .3s ease
        }

        .t-si span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        img {
            max-width: 100%
        }

        .t-s span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        .t-s.active span {
            color: #fff
        }

        .t-s.active {
            background-color: #9d75bd
        }

        .t-si span {
            font-size: 1.1em;
            line-height: 1.5em;
            font-weight: 700;
            color: #773a35;
            padding: 5px 20px
        }

        .t-s:after {
            background-color: #f00;
            position: absolute;
            right: 12px;
            top: 7px;
            padding: 5px;
            background: rgba(255,255,255,1);
            content: "√";
            display: none;
            opacity: 0.8;
            -webkit-transition: opacity 3s ease;
            font-size: 1.1em
        }

        .t-s.error:after {
            background: rgba(255,0,0,1);
            content: "×";
            color: #fff
        }

        .t-s.active:after {
            display: block;
            opacity: 1
        }

        .t-c {
            line-height: 1.5em;
            padding: 10px;
            margin-bottom: 10px;
            font-size: 0.95rem;
            text-align: left;
            color: #332625;
            overflow: hidden
        }

        .t-s.h {
            max-width: 60%;
            display: inline-block;
            margin-left: 5px;
            margin-right: 5px
        }

        .t-si.h {
            max-width: 60%;
            display: inline-block;
            margin-left: 5px;
            margin-right: 5px
        }

        .t-r {
            font-weight: 700;
            overflow: hidden
        }

        .t-r span {
            display: inline-block;
            vertical-align: middle;
            font-size: 50px;
            color: #27AE60;
            text-shadow: 3px 0 4px #16A085
        }

        .t-img {
            margin-top: 10px;
            margin-bottom: 10px
        }

        .t-img img {
            width: 240px;
            height: 180px;
            max-width: 90%
        }

        .t-btn,.t-btn:link,.t-btn:visited {
            color: #fff;
            background-color: #9d75bd;
            padding-top: 12px;
            padding-bottom: 13px;
            padding-left: 15px;
            padding-right: 15px;
            display: inline-block;
            line-height: 1em;
            min-width: 60%;
            margin: 10px auto;
            border-radius: 7px;
            text-decoration: none
        }

        .t-btn {
            font-size: 1.1em
        }

        .share {
            position: fixed;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            background: rgba(0,0,0,.6);
            display: none;
            z-index: 1000
        }

        .share img {
            position: absolute;
            top: 0;
            right: 0;
            width: 70%;
            max-width: 320px
        }

        .livetip {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0,0,0,.7);
            z-index: 200
        }

        .lt-w {
            position: fixed;
            top: 100px;
            left: 10px;
            right: 10px;
            z-index: 300
        }

        .lt-w .lt-c {
            background-color: #fff;
            padding-top: 10px;
            padding-bottom: 20px
        }

        a,a:link,a:visited {
            color: #fff;
            text-decoration: none;
        }

        .mane{
          width:84%;
          margin-bottom:10px;
          background:url(/mane.png) no-repeat;
          height:60px;
          color:#fff;
          font-size:17px;
          line-height:36px;
          background-size:100%;
          text-overflow:ellipsis;
          white-space:nowrap;
          word-break:keep-all;
          padding:0 25px;
          overflow:hidden
          }

        .scrollable {
            position: relative;
            width: 100%;
            height: 60px;
            overflow: hidden;
            text-align: center
        }

        .scrollable .items {
            height: 2000em;
            width: 100%;
            position: absolute;
            overflow: hidden
        }

        .scrollable .items img {
            height: 60px;
            width: 100%
        }

        .divmenu {
            width: 100%;
            color: #fff;
            margin-top: 45px;
            line-height: 40px;
            overflow: hidden
        }

        .divmenu a {
            color: #EFEFEF
        }

        .button {
            display: inline-block;
            zoom:1;height: 40px;
            vertical-align: baseline;
            margin: 0 2px;
            outline: 0;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            font: 16px/100% Arial,Helvetica,sans-serif;
            padding: .5em 2em .55em;
            text-shadow: 0 1px 1px rgba(0,0,0,.3);
            -webkit-border-radius: .5em;
            -moz-border-radius: .5em;
            border-radius: .5em;
            -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
            -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
            box-shadow: 0 1px 2px rgba(0,0,0,.2)
        }

        .button:hover {
            text-decoration: none
        }

        .button:active {
            position: relative;
            top: 1px
        }

        .t-img ul li {
            list-style: none;
            max-width: 100%;
            font-size: 18px;
        }

        select {
            width: 25%;
            height: 34px;
            line-height: 34px;
            border: 1px solid #9bc0dd;
            border-radius: 24px;
            padding-left: 20px;
            -webkit-appearance: none;
            text-align: center;
            font-size: 20px;
        }

        article {
            margin-top: 20px;
            background-color: #f6f6f6;
        }

        .list .box {
            background-color: #fff;
        }

        .list .box .title {
            width: 100%;
            text-align: center;
            height: 40px;
            line-height: 40px;
            background-color: #fff;
            flex-direction: row;
            justify-content: space-between;
        }

        .list .box .title h3 {
            margin-left: 8px;
            font-weight: bold;
        }

        .list .box ul {
            display: flex;
            padding-bottom: 40px;
            flex-direction: column;
            list-style: none;
            margin-left: 2.5%;
            width: 95%;
        }

        .list .box ul li {
            display: flex;
            flex-direction: row;
            position: relative;
            border-bottom: .05rem solid #f6f6f6;
            padding: .625rem 0;
        }

        .list .box .pic {
            width: 4.2rem;
            height: 4.2rem;
            border-radius: .25rem;
            background-size: cover;
            background-position: 50%;
            margin-top: .625rem;
        }

        .list .box .cen {
            width: 58%;
            padding: .5rem;
        }

        .list .box .cen h3 {
            color: #333;
            display: -webkit-box;
            font-size: 14px;
            font-weight: 500;
            line-height: 20px;
            text-overflow: ellipsis;
            padding-top: .2rem;
        }

        .list .box .cen .description {
            color: #8a8a8a;
            padding-top: .25rem;
            line-height: 1.2rem;
            height: 2.4rem;
            overflow: hidden;
            font-size: .75rem;
            text-overflow: ellipsis;
            display: -webkit-box;
        }

        .list .box .lat {
            display: flex;
            width: 18%;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .list .box .lat .go {
            color: #000;
            background-color: #ffdd2b;
            border-radius: .2rem;
            line-height: 40px;
            width: 50px;
            height: 40px;
            text-align: center;
            font-weight: 600;
        }

        .list .box .lat .donum {
            text-align: center;
            font-size: 12px;
            color: #8a8a8a;
        }
    </style>
</head>
<body class="loading">


<script>
    console.log('this common form');
    // 记录多少人来到了问题页面
    // $.get("/visit", {sign: "huojisui", visit_type: 1});
</script>



<link rel="stylesheet" href="/exam/source/exam/default/css/modal.css">

<div class="modal">
    <div class="modal-inner">
        <p id="guideText">关注我</p>
        <img src="" alt="" class="qrcode">
        <div style="font-size: 12px; color: #ccc;">长按二维码识别</div>
        <div class="close-btn"></div>
    </div>
</div>
<script>
    // 查看更多显示二维码
    // $('#guideText').html('关注我<br>会有更多好玩测试');
    // $('.qrcode').attr('src', '/getwxcode?v=' + getrd());
    //画二维码
    function drawQr() {
        // 制作本题的二维码
        let qrcode= $('#code').qrcode('http://afhyjv.bbb183com.cn/geturlcode/UXDrd-huojisui').hide();
        let canvas=qrcode.find('canvas').get(0);

        qr = new Image();
        //   qr.crossOrigin = "Anonymous";
        qr.onload = function () {
            let obj = imgPara("xy(350,850)","120","120","0");
            ctx.rotate(obj.rot * Math.PI / 180);//旋转角度
            ctx.drawImage(qr, obj.x, obj.y, obj.w, obj.h);
            ctx.rotate(-obj.rot * Math.PI / 180);//调整旋转起点
            datasToPng();
        }
        qr.src = canvas.toDataURL('image/jpg');
    }
    // 执行画二维码的操作
    // drawQr();
</script>




<style>
    .return-con {
        -webkit-text-size-adjust: none;
        display: flex;
        line-height: 45px;
        position: fixed;
        top: 0px;
        left: 0px;
        width: 100%;
        border-bottom: .01333rem solid #d0d0d0;
        background: #f6f6fb;
        z-index: 1200;
    }

    .return-btn {
        line-height: 45px;
        padding-left: 1.2rem;
        color: #000;
        display: flex;
        font-size: 16px;
        padding-right: 13px;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        position: relative;
    }

    .return-btn::before {
        content: "";
        position: absolute;
        top: 0;
        left: .2rem;
        bottom: 0;
        margin: auto;
        width: 9px;
        height: 16px;
        background: url('') 50% no-repeat;
        background-size: .48rem auto;
    }
    .ts-btn {
        line-height: 45px;
        display: flex;
        position: fixed;
        right: 25px;
    }

    .ts-btn a {
        color: #000;
        text-decoration: none;
        font-size: 16px;
    }
</style>
<div class="return-con">
    <div  class="return-btn">返回</div>
    <div class="ts-btn">
        <a href="/complaint/index.html">投诉</a>
    </div>
</div>
<div class="divmenu"></div>
<div style="width:100%; height:5px;"></div>
<script>
    $('.return-btn').click(function() {
        history.back(-1);
    })
</script>
<div id="mcover" class="share" style="background:#1A1A1A;height: 100%;position: fixed;top: 0;width: 100%;z-index: 1;text-align: center;color: #FFFFFF;font-size: 30px;padding-top: 100px;font-weight: bold;display:none;">
    跳转中，请稍候......
</div>
<script src="/exam/source/exam/default/js/menu.js"></script>

<div class="head"></div>
<div class="main" id="main" ms-controller="test">

    <!-- 侧试题 -->
    <div ms-if="item.type=='hello'" >
        <div class="mane">测测你可以活多少岁！</div>

        <div class="t-c" ms-if="item.text">
            {{item.text}}
        </div>
        <div class="t-img" ms-if="item.img">
            <img ms-attr-src="{{item.img}}">
        </div>
        <div class="t-s h" ms-repeat-elem="item.select" ms-class-active="elem.active"  ms-on-click="elem.tap(elem, item.select)">
            <span>{{elem.text}}</span>
        </div>

<!--        <div class="t-btn"><a href="javascript:void(0)" id='restart-btn'>我想玩其他好玩的</a></div>-->
<!--        <script>-->
<!--            $('#restart-btn').on('click', function () {-->
<!--                $('.modal').show();-->
<!--            });-->
<!--            $('.modal .close-btn').on('click', function () {-->
<!--                $('.modal').hide();-->
<!--                location.href="/";-->
<!--            })-->
<!--        </script>-->
    </div>
    <div ms-if="item.type=='select'">
        <div class="mane">测测你可以活多少岁！</div>

        <div class="t-c">
            {{item.text}}
            <div ms-if="item.img" style="margin-bottom:0.5em;">
                <img ms-attr-src="{{item.img}}">
            </div>
        </div>
        <div class="t-s" ms-repeat-elem="item.select" ms-class-active="elem.active" ms-on-click="elem.tap(elem, item.select)">
            <img ms-if="!!elem.img" ms-attr-src="{{elem.img}}">
            <span>{{elem.text}}</span>
        </div>
<!--        <div class="t-btn"><a href="/">我想玩其他好玩的</a></div>-->

    </div>


    <div class="livetip" ms-visible="livetip" ms-on-tap="hidelivetip()">
    </div>
    <div id="sans">
        <style> .t-btn
            {
                color: #fff;
                background-color: #9d75bd;
                padding-top: 12px;
                padding-bottom: 13px;
                padding-left: 15px;
                padding-right: 15px;
                display: inline-block;
                line-height: 1em;
                min-width: 60%;
                margin: 10px auto;
                border-radius: 7px;
                text-decoration: none;
            }</style>
    </div>
</div>

<article class="list">
    <div class="box">
        <div class="title"><h3>↓大家都在玩↓</h3></div>
        <ul>
            <li class="item" data-url="http://<?php echo $data['d1']?>/form/piancaiyun/index.php?form=piancaiyun">
                <div class="pic" style="background-image:url(/exam/storage/exam/image/piancaiyun/icon.jpg);"></div>
                <div class="cen">
                    <h3>测测您的偏财运如何？</h3>
                    <div class="description">经济不景气，荷包都缩水了，有钱不是万能，但是没有钱则万万不能！除了更努力工作、减少开销，也要有效的理财，象股票这种财在风水之中称之为偏财，如打牌、彩票之类都可以称之为偏财。赶快来预测一下，看看你近期的偏财运如何吧？</div>
                </div>
                <div class="lat">

                    <div class="go">GO</div>
                    <div class="donum">5w+热度</div>

                </div>
            </li>
        </ul>
    </div>
    <script>
        $(".list .item").click(function(){
            var url = $(this).data('url');
            location.replace(url);
        })
    </script>
</article>


<script type="text/javascript" >


    function showQ() {
        $("#zhao").hide();
    }
</script>
<script>
    var ID = getQueryString("sid") || Date.now() + "" + Math.floor(Math.random() * 1000);
    var fen = 0;
    function tap(elemvm, select, cb) {
        var a = false;
        for (var i = 0; i < select.length; i++) {
            a = a || select[i].active;
        };
        if (!a) {
            elemvm.active = true;
            setTimeout(function () {
                cb && cb()
            }, 300)
        }
    }
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = location.search.substr(1).match(reg);
        if (r != null) return unescape(decodeURI(r[2])); return null;
    }
    var model = avalon.define("test", function (vm) {
        vm.arr = [
            {
                type: "hello",
                text: "吸烟减寿、运动增寿是人们早已耳熟能详的健康理论，但是实际上影响人的寿命的因素还有很多。那么就让我们假设自己的平均寿命为70岁，看看以这个数字为基点的加减法都与什么有关吧。",
                img:imgurl + "/huojisui/img/q1.jpg",
                select: [
                    {
                        text: "开始测试",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select, function () {
                                model.item = model.arr[1];
                            });
                        }
                    }
                ]
            },
            {
                type: "select",id: 1,
                text: "你的生活所在地：",
                select: [
                    {
                        text: "中国大陆",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[2]
                            });
                        }
                    },
                    {
                        text: "中国台湾",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[2]
                            });
                        }
                    },
                    {
                        text: "中国香港",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[2]
                            });
                        }
                    },
                    {
                        text: "其它地区",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[2]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 2,
                text: "您的居住环境状况？",
                select: [
                    {
                        text: "空气清新，室内通风良好",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[3]
                            });
                        }
                    },
                    {
                        text: "生活在城市",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[3]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 3,
                text: "您吸烟的习惯？",
                select: [
                    {
                        text: "本人不吸烟",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 4;
                                model.item = model.arr[4]
                            });
                        }
                    },
                    {
                        text: "本人不吸烟，但经常与抽烟的人工作和生活在一起",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[4]
                            });
                        }
                    },
                    {
                        text: "每天吸烟少于5支",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[4]
                            });
                        }
                    },
                    {
                        text: "每天吸烟5 - 10支",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[4]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 4,
                text: "您喝酒的习惯？",
                select: [
                    {
                        text: "本人不喝酒或者偶尔喝两杯",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[5]
                            });
                        }
                    },
                    {
                        text: "每天喝适量的酒，1-3杯果酒或 1-3口白酒",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[5]
                            });
                        }
                    },
                    {
                        text: " 酗酒，常常喝醉",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[5]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 5,
                text: "您吃早餐的习惯？",
                select: [
                    {
                        text: "基本上不吃早餐",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[6]
                            });
                        }
                    },
                    {
                        text: "有时间就吃，没时间就不吃",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[6]
                            });
                        }
                    },
                    {
                        text: "每天都要吃早餐",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[6]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 6,
                text: "您喝咖啡（含有咖啡因）的习惯？",
                select: [
                    {
                        text: "很少喝或基本上不喝",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[7]
                            });
                        }
                    },
                    {
                        text: "每天喝1-3杯",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[7]
                            });
                        }
                    },
                    {
                        text: "每天3杯以上",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[7]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 7,
                text: "你有喝茶的习惯吗？",
                select: [
                    {
                        text: "是的，我喜欢喝茶",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[8]
                            });
                        }
                    },
                    {
                        text: "没有，我不喜欢喝茶",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[8]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 8,
                text: "您每天坚持刷牙吗？",
                select: [
                    {
                        text: "是的，我每天都刷牙",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[9]
                            });
                        }
                    },
                    {
                        text: "不是",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[9]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 9,
                text: "您平时有意识的控制自己喝水（补充水份）",
                select: [
                    {
                        text: "是的",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[10]
                            });
                        }
                    },
                    {
                        text: "不是",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[10]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 10,
                text: "你每天会补充钙（例如服食钙片）",
                select: [
                    {
                        text: "是的",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[11]
                            });
                        }
                    },
                    {
                        text: "不是",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[11]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 11,
                text: "您的睡眠状况",
                select: [
                    {
                        text: "基本保持每晚睡6-9小时",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[12]
                            });
                        }
                    },
                    {
                        text: "经常性的睡眠时间不到6小时或超过9小时",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[12]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 12,
                text: "平均一周吃多少次快餐或垃圾食品",
                select: [
                    {
                        text: "基本上不吃",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[13]
                            });
                        }
                    },
                    {
                        text: "1-5次以下",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[13]
                            });
                        }
                    },
                    {
                        text: "5次以上",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[13]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 13,
                text: "你喜欢吃烧烤（烤制食品）吗？",
                select: [
                    {
                        text: "是的，我喜欢",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[14]
                            });
                        }
                    },
                    {
                        text: "不，我不喜欢",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[14]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 14,
                text: "平均一周有多少天能达到至少锻炼30分钟？",
                select: [
                    {
                        text: "7天都有",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[15]
                            });
                        }
                    },
                    {
                        text: "3天左右",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[15]
                            });
                        }
                    },
                    {
                        text: "很少锻炼",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 1;
                                model.item = model.arr[15]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 15,
                text: "你对人生逐渐走向衰老有什么看法？",
                select: [
                    {
                        text: "我挺乐观的",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[16]
                            });
                        }
                    },
                    {
                        text: "我感到哀伤",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[16]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 16,
                text: "你是否与家人之间联系密切，与朋友经常相聚？",
                select: [
                    {
                        text: "是的",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[17]
                            });
                        }
                    },
                    {
                        text: "不是",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[17]
                            });
                        }
                    },
                    {
                        text: "偶尔",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[17]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 17,
                text: "经常超负荷工作吗？",
                select: [
                    {
                        text: "经常",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[18]
                            });
                        }
                    },
                    {
                        text: "偶尔",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[18]
                            });
                        }
                    },
                    {
                        text: "很少",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[18]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 18,
                text: "你长期曝露在日光下，风吹日晒，并且没有任何防护措施？",
                select: [
                    {
                        text: "是的",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[19]
                            });
                        }
                    },
                    {
                        text: "不是",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[19]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 19,
                text: "基本上保证至少每两天一次大便？",
                select: [
                    {
                        text: "是的，能保证",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[20]
                            });
                        }
                    },
                    {
                        text: "不能保证",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[20]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 20,
                text: "你是否善于自我减压？",
                select: [
                    {
                        text: "是的",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[21]
                            });
                        }
                    },
                    {
                        text: "不是",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[21]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 21,
                text: "你的性格情绪特征？",
                select: [
                    {
                        text: "性情文雅、随和、理智、心情愉快",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[22]
                            });
                        }
                    },
                    {
                        text: "经常心烦、情绪低落，精神紧张、忧郁",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[22]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 22,
                text: "你重视自己的身体健康，定期做体检？",
                select: [
                    {
                        text: "是的",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[23]
                            });
                        }
                    },
                    {
                        text: "不是",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[23]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 23,
                text: "你的健康状况：",
                select: [
                    {
                        text: "自我感觉良好",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                model.item = model.arr[24]
                            });
                        }
                    },
                    {
                        text: "自我感觉不太乐观",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                model.item = model.arr[24]
                            });
                        }
                    },
                ]
            },
            {
                type: "select",id: 24,
                text: "你的祖父母或曾祖父母中有活过95岁的？",
                select: [
                    {
                        text: "是的，有",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 2;
                                toShare(fen);
                            });
                        }
                    },
                    {
                        text: "没有",
                        active: false,
                        tap: function (ele, select) {
                            tap(ele, select,function () {
                                fen += 3;
                                toShare(fen);
                            });
                        }
                    },
                ]
            },
        ];
        vm.item = vm.arr[0];
        vm.$watch("item", function (newval) {
            if (newval.id == 1) {
                $("article").hide();
                return false;
            };
        })
        vm.livetip = false;
    });

    document.body.className = "";
    function toShare(fen){
        var fen = randomNum(870, 1210)/10;
        tarShare(fen);
    }
    function tarShare(score) {
        var url = share_url + "share/huojisui?id=" + score + "&res=" + getletter(10);
        location.href = url;
        return false;
    }

    function randomNum(minNum,maxNum){
        switch(arguments.length){
            case 1:
                return parseInt(Math.random()*minNum+1,10);
                break;
            case 2:
                return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10);
                break;
            default:
                return 0;
                break;
        }
    }
</script>


<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?<?php echo $data['baidu_id']?>";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<script>
    console.log('this common footer');
    $.ajax({
        'url' : 'http://<?php echo $data['d6'];?>/count_views.php',
        'type' : 'POST',
        'data': {res: 'friend'},
        'success' : function(){}
    });
</script>


<script type="text/javascript">
    function onBridgeReady() {
        WeixinJSBridge.call('hideOptionMenu');
    }
    if (typeof WeixinJSBridge == "undefined") {
        if (document.addEventListener) {
            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
        } else if (document.attachEvent) {
            document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
        }
    } else {
        onBridgeReady();
    }
</script>
</body>
</html>
